Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 4 - Commands


Double Angle Brackets in Results and Scripts

You may occasionally notice terms like this within double angle brackets in a script or a result:

<<event sysodlog»
In general, AppleScript uses double angle brackets when it can't locate the dictionary it needs to identify a term or can't display a value directly. The first word within the double angle brackets can be any of these: event, property, class, data, preposition, keyform, constant, or script. The second word varies depending on the context.

If double angle brackets appear unexpectedly in a script when you open it with the Script Editor, it may be because a command used in the script is not present in the Scripting Additions folder (which is located in the Extensions folder of the System folder) for your computer. For example, if you create a script that uses the Display Dialog command, then open the script at a later time or on a different computer when the Display Dialog scripting addition is not present
in the Scripting Additions folder, AppleScript replaces the words display dialog in the script with <<event sysodlog». In this case you should drop the icon for the Display Dialog scripting addition into the Scripting Additions folder before attempting to run the script.

Double angle brackets can also occur in results. For example, if the value of a variable is a script object named Joe, AppleScript represents the script object as shown in this script:

script Joe
   property theCount : 0
end script

set x to Joe
x
--result: <<script Joe»
(For more information about script objects, see Chapter 9, "Script Objects.")

Similarly, if the value of a variable is of class Data and AppleScript can't represent the data directly, the value of the data is represented within angle brackets by the word data followed by some sequence of ASCII characters. Although this may not resemble the original data, the data's original format
is preserved. You can treat the data like any other value, except that you
can't view it directly in any Script Editor window.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996